package com.mspbots.core.wise.mapper;

import com.mspbots.core.DefaultBaseMapper;
import com.mspbots.core.wise.model.TenantUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * com.mspbots.core.mapper.TenUserMapper
 *
 * @author Alex bob(https://github.com/vnobo)
 * @date Created by 2019/6/27
 */
@Mapper
public interface TenantUserMapper extends DefaultBaseMapper<TenantUser> {

    /**
     * get last one user
     *
     * @param tenant tenant id
     * @return user info
     */
    TenantUser selectLastOne(@Param("tenant") Long tenant);

    List<TenantUser> getMessageSwitch(List<Long> userList);

    /**
     * @param entity TenantUser
     * @return status
     */
    int updateAllColumnById(TenantUser entity);
}
